package com.bean;

public class User
{
    public User()
    {
        
    }
    
    public User(int u_id,double u_grade)
    {
        this.u_id = u_id;
        this.u_grade = u_grade;
    }
    
    private int u_id;

    private String u_name;

    private String u_password;

    private int u_type = 0;
    
    private String u_type_str;

    private double u_grade = -1;
    
    private String u_grade_str;
    
    private String key;
    
    private int type = 0;

    public int getU_id()
    {
        return u_id;
    }

    public void setU_id(int uId)
    {
        u_id = uId;
    }

    public String getU_name()
    {
        return u_name;
    }

    public void setU_name(String uName)
    {
        u_name = uName;
    }

    public String getU_password()
    {
        return u_password;
    }

    public void setU_password(String uPassword)
    {
        u_password = uPassword;
    }

    public int getU_type()
    {
        return u_type;
    }

    public void setU_type(int uType)
    {
        u_type = uType;
        if(uType == 0)
        {
            this.u_type_str = "学生";
        }
        else if(uType == 1)
        {
            this.u_type_str = "教师";
        }
    }

    public double getU_grade()
    {
        return u_grade;
    }

    public void setU_grade(double uGrade)
    {
        u_grade = uGrade;
        if(uGrade == -1)
        {
            this.u_grade_str = "还没考试";
        }
        else
        {
            this.u_grade_str = this.u_grade + "";
        }
    }

    public String getU_type_str()
    {
        return u_type_str;
    }

    public void setU_type_str(String uTypeStr)
    {
        u_type_str = uTypeStr;
    }

    public String getU_grade_str()
    {
        return u_grade_str;
    }

    public void setU_grade_str(String uGradeStr)
    {
        u_grade_str = uGradeStr;
    }

    public String getKey()
    {
        return key;
    }

    public void setKey(String key)
    {
        this.key = key;
    }

    public int getType()
    {
        return type;
    }

    public void setType(int type)
    {
        this.type = type;
    }

}
